package controller

import (
	"apitestAfterGo/handler"
	"github.com/kataras/iris/v12"
	"github.com/kataras/iris/v12/mvc"
)

// 初始化路由

func Init(app *iris.Application) {
	mvc.Configure(app, func(application *mvc.Application) {
		application.HandleError(handler.ValidateHandler)
		application.Party("/").Handle(&LoginController{})
		application.Party("/user").Handle(&UserController{})
		application.Party("/urls").Handle(&UrlController{})
		application.Party("/system").Handle(&SystemController{})
		application.Party("/systemInfo").Handle(&SystemInfoController{})
		application.Party("/interface").Handle(&InterfaceController{})
		application.Party("/systemModule").Handle(&SystemModuleController{})
		application.Party("/task").Handle(&TaskController{})
		application.Party("/taskSuite").Handle(&TaskSuiteController{})
		application.Party("/testCase").Handle(&TestCaseController{})
		application.Party("/taskRecord").Handle(&TaskRecordController{})
		application.Party("/taskReport").Handle(&TaskReportController{})
	})
}
